#include<bits/stdc++.h>
#define int long long
#define IOS ios::sync_with_stdio(false),cin.tie(0), cout.tie(0)
#define endl "\n"

using namespace std;

int n;
int ksm(int a, int b) {
	int t = 1;
	while(b) {
		if(b & 1) {
			t = t * a;	
		}
		a = a * a;
		b >>= 1;
	}
	return t;
}
int zh(int x) {
	int t = 0;
	while(x) {
		x /= 10;
		t ++ ;
	}
	return t;
} 

signed main() {
//	IOS;
	int t;
	cin >> t;
	while(t -- ) {
		cin >> n;
		int num = zh(n);
		cout << ksm(10, num) + 1 << endl;
	}  
	return 0;
}
/*
3
2
13
18

11
87
66

*/
